package com.sqtracker.recommender.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {

    @Bean
    public OpenAPI openAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("sqtracker推荐系统API")
                        .description("基于协同过滤和内容推荐的种子资源推荐系统")
                        .version("v1.0.0")
                        .contact(new Contact()
                                .name("sqtracker团队")
                                .url("https://github.com/tdjsnelling/sqtracker")
                                .email("contact@example.com"))
                        .license(new License()
                                .name("MIT")
                                .url("https://opensource.org/licenses/MIT")))
                .externalDocs(new ExternalDocumentation()
                        .description("sqtracker推荐系统文档")
                        .url("https://github.com/tdjsnelling/sqtracker"));
    }
}